package com.hoshiicloud.market.entity.market;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author yangcheng
 * @version 1.0
 * @title: ShareInfo
 * @description: 分享信息表实体
 * @date 2019/8/2 10:59
 * @mail maiboyc@163.com
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ShareInfo implements Serializable {

    private static final long serialVersionUID = 2125296709684545532L;

    /**
     * ID
     */
    @NotNull(message = "主键ID不能为空")
    @ApiModelProperty(name = "id", value = "ID", required = true, dataType = "java.lang.Long", example = "3171776001692664000")
    private Long id;

    /**
     * 租户ID
     */
    @NotNull(message = "租户ID不能为空")
    @ApiModelProperty(name = "companyId", value = "租户ID", required = true, dataType = "java.lang.Long", example = "3171776001692664001")
    private Long companyId;

    /**
     * 平台ID
     */
    @NotNull(message = "平台ID不能为空")
    @ApiModelProperty(name = "platformId", value = "平台ID", required = true, dataType = "java.lang.Long", example = "3171776001692664002")
    private Long platformId;

    /**
     * 消费者ID
     */
    @ApiModelProperty(name = "userId", value = "消费者ID", required = true, dataType = "java.lang.Long", example = "3171776001692664003")
    private Long userId;

    /**
     * 分享类型：1-店铺 2-商品 3-活动
     */
    @NotNull(message = "分享类型不能为空")
    @ApiModelProperty(name = "type", value = "分享类型：1-店铺 2-商品 3-活动", required = true, dataType = "java.lang.Integer", example = "1")
    private Integer type;

    /**
     * 业务表ID
     */
    @ApiModelProperty(name = "businessId", value = "业务表ID", dataType = "java.lang.Long", example = "3171776001692664004")
    private Long businessId;

    /**
     * 小程序页面
     */
    @ApiModelProperty(name = "page", value = "小程序页面", dataType = "java.lang.String", example = "pages/index/index")
    private String page;

    /**
     * 分享链接
     */
    @ApiModelProperty(name = "url", value = "分享链接", dataType = "java.lang.String", example = "http://xxxx/xxxx")
    private String url;

    /**
     * 分享二维码名称
     */
    @ApiModelProperty(name = "qrCodeName", value = "分享二维码名称", dataType = "java.lang.String", example = "杨成-嘉禾园小区-分享码")
    private String qrCodeName;

    /**
     * 创建者
     */
    @NotNull(message = "创建者不能为空")
    @ApiModelProperty(name = "createdBy", value = "创建者", required = true, dataType = "java.lang.String", example = "admin")
    private String createdBy;

    /**
     * 创建时间
     */
    @NotNull(message = "创建时间不能为空")
    @ApiModelProperty(name = "createdTime", value = "创建时间", required = true, dataType = "java.time.LocalDateTime", example = "2019-08-02 11:14:05")
    private LocalDateTime createdTime;

    /**
     * 修改者
     */
    @ApiModelProperty(name = "updatedBy", value = "修改者", dataType = "java.lang.String", example = "admin")
    private String updatedBy;

    /**
     * 修改时间
     */
    @ApiModelProperty(name = "updatedTime", value = "修改时间", dataType = "java.time.LocalDateTime", example = "2019-08-02 11:14:05")
    private LocalDateTime updatedTime;

    /**
     * 删除状态：0-未删除 1-已删除
     */
    @NotNull(message = "删除状态不能为空")
    @ApiModelProperty(name = "deleted", value = "删除状态：0-未删除 1-已删除", required = true, dataType = "java.lang.Integer", example = "0")
    private Integer deleted;

    /**
     * 当前页 默认1
     */
    @ApiModelProperty(name = "pageIndex", value = "当前页码", dataType = "java.lang.Long", hidden = true)
    @TableField(exist = false)
    private Long pageNumber = 1L;

    /**
     * 每页大小 默认10
     */
    @ApiModelProperty(name = "pageSize", value = "每页大小", dataType = "java.lang.Long", hidden = true)
    @TableField(exist = false)
    private Long pageSize = 10L;
}
